home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Merciful 2
/
Merciful - Disc 2.iso
/
software
/
i
/
imagefxv2.1a.lha
/
ImageFX
/
Rexx
/
Browser
/
ConvertToGIF.browse
next >
Wrap
Text File
|
1996-03-02
|
1KB
|
50 lines
/*
* ImageFX Browser Script
*
* All browser scripts are called as follows:
*
* ScriptName.browse <numfiles> <filelist>
*
* Where:
*
* <numfiles> = Number of files selected (could be 0).
* <filelist> = File containing the list of files selected,
* one file per line, with full pathname.
*
* ConvertToGIF.browse:
*
* Convert selected files to 256-color GIFs.
*
*/
OPTIONS RESULTS
PARSE ARG numfiles filelist .
IF numfiles > 0 THEN DO
IF OPEN(infile, filelist, 'Read') THEN DO
SetRender Foreign
Render Colors 256
Render Dither 1 2 0
DO WHILE ~EOF(infile)
curfile = READLN(infile)
IF curfile ~= "" THEN DO
LoadBuffer '"'curfile'"' FORCE
IF rc = 0 THEN DO
Render Go
SaveRenderedAs GIF '"'curfile'.GIF"'
Render Close
END
END
END
CALL CLOSE(infile)
KillBuffer FORCE
END
EXIT 0